﻿Imports System.ComponentModel

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class ucStudentLessonExceptionDetails
    Inherits UcBaseEditControl
    Implements IUcEditControl

#Region "Designer"
    'UserControl overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub
    Friend WithEvents EffectiveDate As org.codegen.win.controls.CGDateTextBox
    Friend WithEvents EffectiveDatelbl As System.Windows.Forms.Label

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.StudentIdlbl = New System.Windows.Forms.Label()
        Me.StudentId = New org.codegen.win.controls.CGComboBox(Me.components)
        Me.LessonIdlbl = New System.Windows.Forms.Label()
        Me.LessonId = New org.codegen.win.controls.CGComboBox(Me.components)
        Me.Commentslbl = New System.Windows.Forms.Label()
        Me.Comments = New org.codegen.win.controls.CGTextBox(Me.components)
        Me.EffectiveDate = New org.codegen.win.controls.CGDateTextBox(Me.components)
        Me.EffectiveDatelbl = New System.Windows.Forms.Label()
        CType(Me.ErrProvider, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'StudentIdlbl
        '
        Me.StudentIdlbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.StudentIdlbl.Location = New System.Drawing.Point(5, 15)
        Me.StudentIdlbl.Name = "StudentIdlbl"
        Me.StudentIdlbl.Size = New System.Drawing.Size(120, 20)
        Me.StudentIdlbl.TabIndex = 0
        Me.StudentIdlbl.Text = "Student"
        Me.StudentIdlbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'StudentId
        '
        Me.StudentId.AssociatedLabel = Me.StudentIdlbl
        Me.StudentId.BackColor = System.Drawing.Color.LightYellow
        Me.StudentId.ErrProvider = Nothing
        Me.StudentId.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.StudentId.isMandatory = True
        Me.StudentId.Location = New System.Drawing.Point(135, 15)
        Me.StudentId.MaxLength = 255
        Me.StudentId.MaxValue = Nothing
        Me.StudentId.MinValue = Nothing
        Me.StudentId.Name = "StudentId"

        Me.StudentId.Size = New System.Drawing.Size(478, 21)
        Me.StudentId.TabIndex = 1
        '
        'LessonIdlbl
        '
        Me.LessonIdlbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LessonIdlbl.Location = New System.Drawing.Point(5, 45)
        Me.LessonIdlbl.Name = "LessonIdlbl"
        Me.LessonIdlbl.Size = New System.Drawing.Size(120, 20)
        Me.LessonIdlbl.TabIndex = 2
        Me.LessonIdlbl.Text = "Lesson"
        Me.LessonIdlbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'LessonId
        '
        Me.LessonId.AssociatedLabel = Me.LessonIdlbl
        Me.LessonId.BackColor = System.Drawing.Color.LightYellow
        Me.LessonId.ErrProvider = Nothing
        Me.LessonId.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.LessonId.isMandatory = True
        Me.LessonId.Location = New System.Drawing.Point(135, 45)
        Me.LessonId.MaxLength = 255
        Me.LessonId.MaxValue = Nothing
        Me.LessonId.MinValue = Nothing
        Me.LessonId.Name = "LessonId"

        Me.LessonId.Size = New System.Drawing.Size(478, 21)
        Me.LessonId.TabIndex = 3
        '
        'Commentslbl
        '
        Me.Commentslbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Commentslbl.Location = New System.Drawing.Point(5, 100)
        Me.Commentslbl.Name = "Commentslbl"
        Me.Commentslbl.Size = New System.Drawing.Size(120, 20)
        Me.Commentslbl.TabIndex = 6
        Me.Commentslbl.Text = "Comments"
        Me.Commentslbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Comments
        '
        Me.Comments.AssociatedLabel = Me.Commentslbl
        Me.Comments.BackColor = System.Drawing.Color.Transparent
        Me.Comments.ErrProvider = Nothing
        Me.Comments.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Comments.FormatPattern = Nothing
        Me.Comments.isMandatory = False
        Me.Comments.Location = New System.Drawing.Point(135, 100)
        Me.Comments.MaxLength = 255
        Me.Comments.MaxValue = Nothing
        Me.Comments.MinValue = Nothing
        Me.Comments.Multiline = True
        Me.Comments.Name = "Comments"
        '
        Me.Comments.Size = New System.Drawing.Size(330, 68)
        Me.Comments.TabIndex = 7
        '
        'EffectiveDate
        '
        Me.EffectiveDate.AssociatedLabel = Me.EffectiveDatelbl
        Me.EffectiveDate.BackColor = System.Drawing.Color.LightYellow
        Me.EffectiveDate.ErrProvider = Me.ErrProvider
        Me.EffectiveDate.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.EffectiveDate.isMandatory = True
        Me.EffectiveDate.Location = New System.Drawing.Point(135, 72)
        Me.EffectiveDate.MaxValue = Nothing
        Me.EffectiveDate.MinValue = Nothing
        Me.EffectiveDate.Name = "EffectiveDate"
        '
        Me.EffectiveDate.Size = New System.Drawing.Size(154, 21)
        Me.EffectiveDate.TabIndex = 5
        '
        'EffectiveDatelbl
        '
        Me.EffectiveDatelbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.EffectiveDatelbl.Location = New System.Drawing.Point(5, 73)
        Me.EffectiveDatelbl.Name = "EffectiveDatelbl"
        Me.EffectiveDatelbl.Size = New System.Drawing.Size(120, 20)
        Me.EffectiveDatelbl.TabIndex = 4
        Me.EffectiveDatelbl.Text = "Effective Date"
        Me.EffectiveDatelbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'ucStudentLessonExceptionDetails
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange
        Me.Controls.Add(Me.EffectiveDate)
        Me.Controls.Add(Me.EffectiveDatelbl)
        Me.Controls.Add(Me.StudentIdlbl)
        Me.Controls.Add(Me.StudentId)
        Me.Controls.Add(Me.LessonIdlbl)
        Me.Controls.Add(Me.LessonId)
        Me.Controls.Add(Me.Commentslbl)
        Me.Controls.Add(Me.Comments)
        Me.Name = "ucStudentLessonExceptionDetails"
        Me.Size = New System.Drawing.Size(709, 195)
        CType(Me.ErrProvider, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub



    Friend WithEvents StudentIdlbl As System.Windows.Forms.Label
    Friend WithEvents StudentId As CGComboBox
    Friend WithEvents LessonIdlbl As System.Windows.Forms.Label
    Friend WithEvents LessonId As CGComboBox
    Friend WithEvents Commentslbl As System.Windows.Forms.Label
    Friend WithEvents Comments As CGTextBox


#End Region

#Region "Properties"

#End Region

#Region "Methods"

    ''' <summary>
    ''' Fills the controls on the screen from data in the object
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub _loadData() Handles Me.evLoadObjectData


        Dim mo As StudentLessonCredit = DirectCast(Me.ModelObject(), StudentLessonCredit)
        Me.StudentId.Value = mo.StudentId
        Me.LessonId.Value = mo.LessonId
        Me.Comments.value = mo.Comments
        Me.EffectiveDate.value = mo.EffectiveDate

    End Sub



    ''' <summary>
    ''' Loads the object from the database and then sets the proeperties 
    ''' of the object from values on the controls
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub _loadToObject() Handles Me.evLoadToObject

        Dim mo As StudentLessonCredit = DirectCast(Me.ModelObject, StudentLessonCredit)
        mo.StudentId = Me.StudentId.intValue
        mo.LessonId = Me.LessonId.intValue
        mo.setComments(Me.Comments.Text)
        mo.EffectiveDate = Me.EffectiveDate.DateValue

    End Sub



    Public Sub _InitializeControl() Handles Me.InitializeControl

        If Me.isInitialized = False Then
            'setup datasources here
            Me.StudentId.DataSource = New BusObjects.Mappers.StudentDBMapper().findAll()
            Me.StudentId.DisplayMember = "StudentFullName"
            Me.StudentId.ValueMember = "StudentId"

            Me.LessonId.DataSource = New BusObjects.Mappers.LessonDBMapper().findAll()
            Me.LessonId.DisplayMember = "LessonDescription"
            Me.LessonId.ValueMember = "LessonId"


            Me.isInitialized = True
        End If

    End Sub

#End Region


End Class


